more qstringview work for qt6. (#726)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Wed, 29 Sep 2021 15:46:00 +0000 (09:46 -0600)
committerGitHub <noreply@github.com>
Wed, 29 Sep 2021 15:46:00 +0000 (09:46 -0600)
navicache.cc
pocketfms_fp.cc
xol.cc

index c6d1746f4133f1fd72ff9256f8949e65c163a3af..6ffb0f36836965a3cbbe21048a141cdeed4514e3 100644 (file)
@@ -183,7 +183,7 @@ nav_read()
 
   while (!reader.atEnd()) {
     if (reader.tokenType() == QXmlStreamReader::StartElement) {
-      if (reader.name() == "CacheDetails") {
+      if (reader.name() == u"CacheDetails") {
         NaviReadCache(reader);
       }
     }
index 9b925a1a22477260771e00123776bd77507f5398..fbf6d0fa1c81c0620ef23039a3e28ef6fcf3a23e 100644 (file)
@@ -165,7 +165,7 @@ void        wpt_altitude(xg_string, const QXmlStreamAttributes* attrv)
     wpt_to->altitude = attrv->value("Value").toString().toDouble();
   }
   if (attrv->hasAttribute("Unit")) {
-    isFeet = (attrv->value("Unit") == "ft");
+    isFeet = (attrv->value("Unit") == u"ft");
   }
   if (isFeet) {
     wpt_to->altitude = FEET_TO_METERS(wpt_to->altitude);
diff --git a/xol.cc b/xol.cc
index e03a43e65c4d4301b7431e6970f0e616d73df2e0..6b2569f18686a8b6cedada0260f53980e329060b 100644 (file)
--- a/xol.cc
+++ b/xol.cc
@@ -56,7 +56,7 @@ static xg_tag_mapping xol_map[] = {
 
 static void xol_overlay(xg_string, const QXmlStreamAttributes* attrv) {
   if (attrv->hasAttribute("version")) {
-    if (attrv->value("version") != "1.0") {
+    if (attrv->value("version") != u"1.0") {
       fatal(MYNAME ": Unsupported version %s.\n",
             qPrintable(attrv->value("version").toString()));
     }
@@ -65,9 +65,9 @@ static void xol_overlay(xg_string, const QXmlStreamAttributes* attrv) {
 
 static void xol_shape(xg_string, const QXmlStreamAttributes* attrv) {
   if (attrv->hasAttribute("type")) {
-    if (attrv->value("type") == "waypoint") {
+    if (attrv->value("type") == u"waypoint") {
       wpt_ = new Waypoint;
-    } else if (attrv->value("type") == "polyline") {
+    } else if (attrv->value("type") == u"polyline") {
       trk_ = new route_head;
       track_add_head(trk_);
     }